
#include <CompileVisitor.h>

#include "AstNodeStatementList.h"

AstNodeStatementList::AstNodeStatementList()
{
}

void AstNodeStatementList::compile(CompileVisitor * visitor)
{
  visitor->compile(this);
}

AstNodeStatementList::~AstNodeStatementList()
{
  for(unsigned i=0;i<nodes.size();i++) {
    delete nodes[i];
  }
}

#if 0
int  AstNodeStatementList::compile(ClassFile * klass, MethodInfo * method)
{
  for(u2 i=0;i<nodes.size();i++) {
    nodes[i]->compile(klass,method);
  }
  return 0;
}
#endif

void AstNodeStatementList::addNode(AstNode*node)
{
  nodes.push_back(node);
}

void AstNodeStatementList::dump(int level)
{
  for(unsigned i=0;i<nodes.size();i++) 
    nodes[i]->dump(level++);
}
